Integrand size = 41, antiderivative size = 148 \[ \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=-\frac {(2 A-3 B+3 C) \text {arctanh}(\sin (c+d x))}{2 a d}+\frac {(3 A-3 B+4 C) \tan (c+d x)}{a d}-\frac {(2 A-3 B+3 C) \sec (c+d x) \tan (c+d x)}{2 a d}-\frac {(A-B+C) \sec ^3(c+d x) \tan (c+d x)}{d (a+a \sec (c+d x))}+\frac {(3 A-3 B+4 C) \tan ^3(c+d x)}{3 a d} \]
-1/2*(2*A-3*B+3*C)*arctanh(sin(d*x+c))/a/d+(3*A-3*B+4*C)*tan(d*x+c)/a/d-1/ 2*(2*A-3*B+3*C)*sec(d*x+c)*tan(d*x+c)/a/d-(A-B+C)*sec(d*x+c)^3*tan(d*x+c)/ d/(a+a*sec(d*x+c))+1/3*(3*A-3*B+4*C)*tan(d*x+c)^3/a/d
Leaf count is larger than twice the leaf count of optimal. \(898\) vs. \(2(148)=296\).
Time = 7.67 (sec) , antiderivative size = 898, normalized size of antiderivative = 6.07 \[ \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=\frac {2 (2 A-3 B+3 C) \cos ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \cos (c+d x) \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )-\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right ) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{d (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) (a+a \sec (c+d x))}-\frac {2 (2 A-3 B+3 C) \cos ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \cos (c+d x) \log \left (\cos \left (\frac {c}{2}+\frac {d x}{2}\right )+\sin \left (\frac {c}{2}+\frac {d x}{2}\right )\right ) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{d (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) (a+a \sec (c+d x))}+\frac {\cos \left (\frac {c}{2}+\frac {d x}{2}\right ) \sec \left (\frac {c}{2}\right ) \sec (c) \sec ^2(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right ) \left (-6 A \sin \left (\frac {d x}{2}\right )+6 B \sin \left (\frac {d x}{2}\right )+6 C \sin \left (\frac {d x}{2}\right )+30 A \sin \left (\frac {3 d x}{2}\right )-27 B \sin \left (\frac {3 d x}{2}\right )+39 C \sin \left (\frac {3 d x}{2}\right )-12 A \sin \left (c-\frac {d x}{2}\right )+12 B \sin \left (c-\frac {d x}{2}\right )-24 C \sin \left (c-\frac {d x}{2}\right )-6 A \sin \left (c+\frac {d x}{2}\right )+6 B \sin \left (c+\frac {d x}{2}\right )-6 C \sin \left (c+\frac {d x}{2}\right )-24 A \sin \left (2 c+\frac {d x}{2}\right )+24 B \sin \left (2 c+\frac {d x}{2}\right )-24 C \sin \left (2 c+\frac {d x}{2}\right )+12 A \sin \left (c+\frac {3 d x}{2}\right )-9 B \sin \left (c+\frac {3 d x}{2}\right )+21 C \sin \left (c+\frac {3 d x}{2}\right )+12 A \sin \left (2 c+\frac {3 d x}{2}\right )-9 B \sin \left (2 c+\frac {3 d x}{2}\right )+9 C \sin \left (2 c+\frac {3 d x}{2}\right )-6 A \sin \left (3 c+\frac {3 d x}{2}\right )+9 B \sin \left (3 c+\frac {3 d x}{2}\right )-9 C \sin \left (3 c+\frac {3 d x}{2}\right )+6 A \sin \left (c+\frac {5 d x}{2}\right )-3 B \sin \left (c+\frac {5 d x}{2}\right )+7 C \sin \left (c+\frac {5 d x}{2}\right )+3 B \sin \left (2 c+\frac {5 d x}{2}\right )+C \sin \left (2 c+\frac {5 d x}{2}\right )+3 B \sin \left (3 c+\frac {5 d x}{2}\right )-3 C \sin \left (3 c+\frac {5 d x}{2}\right )-6 A \sin \left (4 c+\frac {5 d x}{2}\right )+9 B \sin \left (4 c+\frac {5 d x}{2}\right )-9 C \sin \left (4 c+\frac {5 d x}{2}\right )+12 A \sin \left (2 c+\frac {7 d x}{2}\right )-12 B \sin \left (2 c+\frac {7 d x}{2}\right )+16 C \sin \left (2 c+\frac {7 d x}{2}\right )+6 A \sin \left (3 c+\frac {7 d x}{2}\right )-6 B \sin \left (3 c+\frac {7 d x}{2}\right )+10 C \sin \left (3 c+\frac {7 d x}{2}\right )+6 A \sin \left (4 c+\frac {7 d x}{2}\right )-6 B \sin \left (4 c+\frac {7 d x}{2}\right )+6 C \sin \left (4 c+\frac {7 d x}{2}\right )\right )}{24 d (A+2 C+2 B \cos (c+d x)+A \cos (2 c+2 d x)) (a+a \sec (c+d x))} \]
(2*(2*A - 3*B + 3*C)*Cos[c/2 + (d*x)/2]^2*Cos[c + d*x]*Log[Cos[c/2 + (d*x) /2] - Sin[c/2 + (d*x)/2]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec[c + d*x])) - (2*( 2*A - 3*B + 3*C)*Cos[c/2 + (d*x)/2]^2*Cos[c + d*x]*Log[Cos[c/2 + (d*x)/2] + Sin[c/2 + (d*x)/2]]*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2))/(d*(A + 2*C + 2*B*Cos[c + d*x] + A*Cos[2*c + 2*d*x])*(a + a*Sec[c + d*x])) + (Cos[c/2 + (d*x)/2]*Sec[c/2]*Sec[c]*Sec[c + d*x]^2*(A + B*Sec[c + d*x] + C*Sec[c + d*x]^2)*(-6*A*Sin[(d*x)/2] + 6*B*Sin[(d*x)/2] + 6*C*Sin[(d*x)/2] + 30*A*S in[(3*d*x)/2] - 27*B*Sin[(3*d*x)/2] + 39*C*Sin[(3*d*x)/2] - 12*A*Sin[c - ( d*x)/2] + 12*B*Sin[c - (d*x)/2] - 24*C*Sin[c - (d*x)/2] - 6*A*Sin[c + (d*x )/2] + 6*B*Sin[c + (d*x)/2] - 6*C*Sin[c + (d*x)/2] - 24*A*Sin[2*c + (d*x)/ 2] + 24*B*Sin[2*c + (d*x)/2] - 24*C*Sin[2*c + (d*x)/2] + 12*A*Sin[c + (3*d *x)/2] - 9*B*Sin[c + (3*d*x)/2] + 21*C*Sin[c + (3*d*x)/2] + 12*A*Sin[2*c + (3*d*x)/2] - 9*B*Sin[2*c + (3*d*x)/2] + 9*C*Sin[2*c + (3*d*x)/2] - 6*A*Si n[3*c + (3*d*x)/2] + 9*B*Sin[3*c + (3*d*x)/2] - 9*C*Sin[3*c + (3*d*x)/2] + 6*A*Sin[c + (5*d*x)/2] - 3*B*Sin[c + (5*d*x)/2] + 7*C*Sin[c + (5*d*x)/2] + 3*B*Sin[2*c + (5*d*x)/2] + C*Sin[2*c + (5*d*x)/2] + 3*B*Sin[3*c + (5*d*x )/2] - 3*C*Sin[3*c + (5*d*x)/2] - 6*A*Sin[4*c + (5*d*x)/2] + 9*B*Sin[4*c + (5*d*x)/2] - 9*C*Sin[4*c + (5*d*x)/2] + 12*A*Sin[2*c + (7*d*x)/2] - 12*B* Sin[2*c + (7*d*x)/2] + 16*C*Sin[2*c + (7*d*x)/2] + 6*A*Sin[3*c + (7*d*x...
Time = 0.74 (sec) , antiderivative size = 126, normalized size of antiderivative = 0.85, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.268, Rules used = {3042, 4572, 25, 3042, 4274, 3042, 4254, 2009, 4255, 3042, 4257}
Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.
\(\displaystyle \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a \sec (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )+C \csc \left (c+d x+\frac {\pi }{2}\right )^2\right )}{a \csc \left (c+d x+\frac {\pi }{2}\right )+a}dx\) |
\(\Big \downarrow \) 4572 |
\(\displaystyle \frac {\int -\sec ^3(c+d x) (a (2 A-3 B+3 C)-a (3 A-3 B+4 C) \sec (c+d x))dx}{a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\int \sec ^3(c+d x) (a (2 A-3 B+3 C)-a (3 A-3 B+4 C) \sec (c+d x))dx}{a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\int \csc \left (c+d x+\frac {\pi }{2}\right )^3 \left (a (2 A-3 B+3 C)-a (3 A-3 B+4 C) \csc \left (c+d x+\frac {\pi }{2}\right )\right )dx}{a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 4274 |
\(\displaystyle -\frac {a (2 A-3 B+3 C) \int \sec ^3(c+d x)dx-a (3 A-3 B+4 C) \int \sec ^4(c+d x)dx}{a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {a (2 A-3 B+3 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx-a (3 A-3 B+4 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^4dx}{a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle -\frac {\frac {a (3 A-3 B+4 C) \int \left (\tan ^2(c+d x)+1\right )d(-\tan (c+d x))}{d}+a (2 A-3 B+3 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx}{a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a (2 A-3 B+3 C) \int \csc \left (c+d x+\frac {\pi }{2}\right )^3dx+\frac {a (3 A-3 B+4 C) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}}{a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 4255 |
\(\displaystyle -\frac {a (2 A-3 B+3 C) \left (\frac {1}{2} \int \sec (c+d x)dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {a (3 A-3 B+4 C) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}}{a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {a (2 A-3 B+3 C) \left (\frac {1}{2} \int \csc \left (c+d x+\frac {\pi }{2}\right )dx+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {a (3 A-3 B+4 C) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}}{a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle -\frac {a (2 A-3 B+3 C) \left (\frac {\text {arctanh}(\sin (c+d x))}{2 d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d}\right )+\frac {a (3 A-3 B+4 C) \left (-\frac {1}{3} \tan ^3(c+d x)-\tan (c+d x)\right )}{d}}{a^2}-\frac {(A-B+C) \tan (c+d x) \sec ^3(c+d x)}{d (a \sec (c+d x)+a)}\) |
-(((A - B + C)*Sec[c + d*x]^3*Tan[c + d*x])/(d*(a + a*Sec[c + d*x]))) - (a *(2*A - 3*B + 3*C)*(ArcTanh[Sin[c + d*x]]/(2*d) + (Sec[c + d*x]*Tan[c + d* x])/(2*d)) + (a*(3*A - 3*B + 4*C)*(-Tan[c + d*x] - Tan[c + d*x]^3/3))/d)/a ^2
3.5.50.3.1 Defintions of rubi rules used
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Int[(csc[(c_.) + (d_.)*(x_)]*(b_.))^(n_), x_Symbol] :> Simp[(-b)*Cos[c + d* x]*((b*Csc[c + d*x])^(n - 1)/(d*(n - 1))), x] + Simp[b^2*((n - 2)/(n - 1)) Int[(b*Csc[c + d*x])^(n - 2), x], x] /; FreeQ[{b, c, d}, x] && GtQ[n, 1] && IntegerQ[2*n]
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbol] :> Simp[a Int[(d*Csc[e + f*x])^n, x], x] + Simp[b/d In t[(d*Csc[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, n}, x]
Int[((A_.) + csc[(e_.) + (f_.)*(x_)]*(B_.) + csc[(e_.) + (f_.)*(x_)]^2*(C_. ))*(csc[(e_.) + (f_.)*(x_)]*(d_.))^(n_)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a _))^(m_), x_Symbol] :> Simp[(-(a*A - b*B + a*C))*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((d*Csc[e + f*x])^n/(a*f*(2*m + 1))), x] - Simp[1/(a*b*(2*m + 1)) Int[(a + b*Csc[e + f*x])^(m + 1)*(d*Csc[e + f*x])^n*Simp[a*B*n - b*C*n - A*b*(2*m + n + 1) - (b*B*(m + n + 1) - a*(A*(m + n + 1) - C*(m - n)))*Csc[ e + f*x], x], x], x] /; FreeQ[{a, b, d, e, f, A, B, C, n}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -2^(-1)]
Time = 0.35 (sec) , antiderivative size = 180, normalized size of antiderivative = 1.22
method | result | size |
parallelrisch | \(\frac {\left (\frac {3 C}{2}-\frac {3 B}{2}+A \right ) \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\left (\frac {3 C}{2}-\frac {3 B}{2}+A \right ) \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )+2 \left (\left (A -B +\frac {4 C}{3}\right ) \cos \left (3 d x +3 c \right )+\left (A -\frac {B}{2}+\frac {7 C}{6}\right ) \cos \left (2 d x +2 c \right )+\left (3 A -2 B +\frac {11 C}{3}\right ) \cos \left (d x +c \right )+A -\frac {B}{2}+\frac {11 C}{6}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d \left (\cos \left (3 d x +3 c \right )+3 \cos \left (d x +c \right )\right )}\) | \(180\) |
derivativedivides | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -\frac {C}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {B -2 C}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\left (-\frac {3 C}{2}+\frac {3 B}{2}-A \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {\frac {5 C}{2}-\frac {3 B}{2}+A}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {C}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {-B +2 C}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\left (\frac {3 C}{2}-\frac {3 B}{2}+A \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {\frac {5 C}{2}-\frac {3 B}{2}+A}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}}{d a}\) | \(207\) |
default | \(\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) A -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) B +\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) C -\frac {C}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{3}}-\frac {B -2 C}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )^{2}}+\left (-\frac {3 C}{2}+\frac {3 B}{2}-A \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-\frac {\frac {5 C}{2}-\frac {3 B}{2}+A}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1}-\frac {C}{3 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{3}}-\frac {-B +2 C}{2 \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )^{2}}+\left (\frac {3 C}{2}-\frac {3 B}{2}+A \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-\frac {\frac {5 C}{2}-\frac {3 B}{2}+A}{\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1}}{d a}\) | \(207\) |
norman | \(\frac {\frac {\left (A -B +C \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9}}{a d}+\frac {\left (4 C -2 B +3 A \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{a d}-\frac {\left (9 C -7 B +6 A \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7}}{a d}-\frac {\left (37 C -27 B +30 A \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 a d}+\frac {\left (49 C -39 B +36 A \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{3 a d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{4}}+\frac {\left (2 A -3 B +3 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{2 a d}-\frac {\left (2 A -3 B +3 C \right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{2 a d}\) | \(216\) |
risch | \(\frac {i \left (6 A \,{\mathrm e}^{6 i \left (d x +c \right )}-9 B \,{\mathrm e}^{6 i \left (d x +c \right )}+9 C \,{\mathrm e}^{6 i \left (d x +c \right )}+6 A \,{\mathrm e}^{5 i \left (d x +c \right )}-9 B \,{\mathrm e}^{5 i \left (d x +c \right )}+9 C \,{\mathrm e}^{5 i \left (d x +c \right )}+24 A \,{\mathrm e}^{4 i \left (d x +c \right )}-24 B \,{\mathrm e}^{4 i \left (d x +c \right )}+24 C \,{\mathrm e}^{4 i \left (d x +c \right )}+12 A \,{\mathrm e}^{3 i \left (d x +c \right )}-12 B \,{\mathrm e}^{3 i \left (d x +c \right )}+24 C \,{\mathrm e}^{3 i \left (d x +c \right )}+30 A \,{\mathrm e}^{2 i \left (d x +c \right )}-27 B \,{\mathrm e}^{2 i \left (d x +c \right )}+39 C \,{\mathrm e}^{2 i \left (d x +c \right )}+6 A \,{\mathrm e}^{i \left (d x +c \right )}-3 B \,{\mathrm e}^{i \left (d x +c \right )}+7 C \,{\mathrm e}^{i \left (d x +c \right )}+12 A -12 B +16 C \right )}{3 a d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{3} \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}+\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) A}{a d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) B}{2 a d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}-i\right ) C}{2 a d}-\frac {\ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) A}{a d}+\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) B}{2 a d}-\frac {3 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) C}{2 a d}\) | \(394\) |
((3/2*C-3/2*B+A)*(cos(3*d*x+3*c)+3*cos(d*x+c))*ln(tan(1/2*d*x+1/2*c)-1)-(3 /2*C-3/2*B+A)*(cos(3*d*x+3*c)+3*cos(d*x+c))*ln(tan(1/2*d*x+1/2*c)+1)+2*((A -B+4/3*C)*cos(3*d*x+3*c)+(A-1/2*B+7/6*C)*cos(2*d*x+2*c)+(3*A-2*B+11/3*C)*c os(d*x+c)+A-1/2*B+11/6*C)*tan(1/2*d*x+1/2*c))/a/d/(cos(3*d*x+3*c)+3*cos(d* x+c))
Time = 0.27 (sec) , antiderivative size = 195, normalized size of antiderivative = 1.32 \[ \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=-\frac {3 \, {\left ({\left (2 \, A - 3 \, B + 3 \, C\right )} \cos \left (d x + c\right )^{4} + {\left (2 \, A - 3 \, B + 3 \, C\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (\sin \left (d x + c\right ) + 1\right ) - 3 \, {\left ({\left (2 \, A - 3 \, B + 3 \, C\right )} \cos \left (d x + c\right )^{4} + {\left (2 \, A - 3 \, B + 3 \, C\right )} \cos \left (d x + c\right )^{3}\right )} \log \left (-\sin \left (d x + c\right ) + 1\right ) - 2 \, {\left (4 \, {\left (3 \, A - 3 \, B + 4 \, C\right )} \cos \left (d x + c\right )^{3} + {\left (6 \, A - 3 \, B + 7 \, C\right )} \cos \left (d x + c\right )^{2} + {\left (3 \, B - C\right )} \cos \left (d x + c\right ) + 2 \, C\right )} \sin \left (d x + c\right )}{12 \, {\left (a d \cos \left (d x + c\right )^{4} + a d \cos \left (d x + c\right )^{3}\right )}} \]
integrate(sec(d*x+c)^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c)),x, algorithm="fricas")
-1/12*(3*((2*A - 3*B + 3*C)*cos(d*x + c)^4 + (2*A - 3*B + 3*C)*cos(d*x + c )^3)*log(sin(d*x + c) + 1) - 3*((2*A - 3*B + 3*C)*cos(d*x + c)^4 + (2*A - 3*B + 3*C)*cos(d*x + c)^3)*log(-sin(d*x + c) + 1) - 2*(4*(3*A - 3*B + 4*C) *cos(d*x + c)^3 + (6*A - 3*B + 7*C)*cos(d*x + c)^2 + (3*B - C)*cos(d*x + c ) + 2*C)*sin(d*x + c))/(a*d*cos(d*x + c)^4 + a*d*cos(d*x + c)^3)
\[ \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=\frac {\int \frac {A \sec ^{3}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx + \int \frac {B \sec ^{4}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx + \int \frac {C \sec ^{5}{\left (c + d x \right )}}{\sec {\left (c + d x \right )} + 1}\, dx}{a} \]
(Integral(A*sec(c + d*x)**3/(sec(c + d*x) + 1), x) + Integral(B*sec(c + d* x)**4/(sec(c + d*x) + 1), x) + Integral(C*sec(c + d*x)**5/(sec(c + d*x) + 1), x))/a
Leaf count of result is larger than twice the leaf count of optimal. 485 vs. \(2 (142) = 284\).
Time = 0.25 (sec) , antiderivative size = 485, normalized size of antiderivative = 3.28 \[ \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=\frac {C {\left (\frac {2 \, {\left (\frac {9 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {16 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac {15 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}}\right )}}{a - \frac {3 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {3 \, a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac {a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}}} - \frac {9 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} + \frac {9 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} + \frac {6 \, \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} - 3 \, B {\left (\frac {2 \, {\left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {3 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{a - \frac {2 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} - \frac {3 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} + \frac {3 \, \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} + \frac {2 \, \sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )} - 6 \, A {\left (\frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{a} - \frac {\log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{a} - \frac {2 \, \sin \left (d x + c\right )}{{\left (a - \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )} {\left (\cos \left (d x + c\right ) + 1\right )}} - \frac {\sin \left (d x + c\right )}{a {\left (\cos \left (d x + c\right ) + 1\right )}}\right )}}{6 \, d} \]
integrate(sec(d*x+c)^3*(A+B*sec(d*x+c)+C*sec(d*x+c)^2)/(a+a*sec(d*x+c)),x, algorithm="maxima")
1/6*(C*(2*(9*sin(d*x + c)/(cos(d*x + c) + 1) - 16*sin(d*x + c)^3/(cos(d*x + c) + 1)^3 + 15*sin(d*x + c)^5/(cos(d*x + c) + 1)^5)/(a - 3*a*sin(d*x + c )^2/(cos(d*x + c) + 1)^2 + 3*a*sin(d*x + c)^4/(cos(d*x + c) + 1)^4 - a*sin (d*x + c)^6/(cos(d*x + c) + 1)^6) - 9*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a + 9*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a + 6*sin(d*x + c)/(a* (cos(d*x + c) + 1))) - 3*B*(2*(sin(d*x + c)/(cos(d*x + c) + 1) - 3*sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/(a - 2*a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + a*sin(d*x + c)^4/(cos(d*x + c) + 1)^4) - 3*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a + 3*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a + 2*sin(d*x + c)/(a*(cos(d*x + c) + 1))) - 6*A*(log(sin(d*x + c)/(cos(d*x + c) + 1) + 1)/a - log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/a - 2*sin(d*x + c)/((a - a *sin(d*x + c)^2/(cos(d*x + c) + 1)^2)*(cos(d*x + c) + 1)) - sin(d*x + c)/( a*(cos(d*x + c) + 1))))/d
Time = 0.34 (sec) , antiderivative size = 243, normalized size of antiderivative = 1.64 \[ \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=-\frac {\frac {3 \, {\left (2 \, A - 3 \, B + 3 \, C\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1 \right |}\right )}{a} - \frac {3 \, {\left (2 \, A - 3 \, B + 3 \, C\right )} \log \left ({\left | \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 1 \right |}\right )}{a} - \frac {6 \, {\left (A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{a} + \frac {2 \, {\left (6 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 9 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} + 15 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{5} - 12 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 12 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} - 16 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{3} + 6 \, A \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - 3 \, B \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 9 \, C \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )\right )}}{{\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - 1\right )}^{3} a}}{6 \, d} \]
-1/6*(3*(2*A - 3*B + 3*C)*log(abs(tan(1/2*d*x + 1/2*c) + 1))/a - 3*(2*A - 3*B + 3*C)*log(abs(tan(1/2*d*x + 1/2*c) - 1))/a - 6*(A*tan(1/2*d*x + 1/2*c ) - B*tan(1/2*d*x + 1/2*c) + C*tan(1/2*d*x + 1/2*c))/a + 2*(6*A*tan(1/2*d* x + 1/2*c)^5 - 9*B*tan(1/2*d*x + 1/2*c)^5 + 15*C*tan(1/2*d*x + 1/2*c)^5 - 12*A*tan(1/2*d*x + 1/2*c)^3 + 12*B*tan(1/2*d*x + 1/2*c)^3 - 16*C*tan(1/2*d *x + 1/2*c)^3 + 6*A*tan(1/2*d*x + 1/2*c) - 3*B*tan(1/2*d*x + 1/2*c) + 9*C* tan(1/2*d*x + 1/2*c))/((tan(1/2*d*x + 1/2*c)^2 - 1)^3*a))/d
Time = 16.78 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.11 \[ \int \frac {\sec ^3(c+d x) \left (A+B \sec (c+d x)+C \sec ^2(c+d x)\right )}{a+a \sec (c+d x)} \, dx=\frac {\left (2\,A-3\,B+5\,C\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+\left (4\,B-4\,A-\frac {16\,C}{3}\right )\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\left (2\,A-B+3\,C\right )\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (-a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6+3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-3\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+a\right )}+\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (A-B+C\right )}{a\,d}-\frac {2\,\mathrm {atanh}\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )\,\left (A-\frac {3\,B}{2}+\frac {3\,C}{2}\right )}{a\,d} \]
(tan(c/2 + (d*x)/2)*(2*A - B + 3*C) + tan(c/2 + (d*x)/2)^5*(2*A - 3*B + 5* C) - tan(c/2 + (d*x)/2)^3*(4*A - 4*B + (16*C)/3))/(d*(a - 3*a*tan(c/2 + (d *x)/2)^2 + 3*a*tan(c/2 + (d*x)/2)^4 - a*tan(c/2 + (d*x)/2)^6)) + (tan(c/2 + (d*x)/2)*(A - B + C))/(a*d) - (2*atanh(tan(c/2 + (d*x)/2))*(A - (3*B)/2 + (3*C)/2))/(a*d)